FROM ubuntu:16.04
LABEL maintainer="lizhen@example.com"
ENV REFRESHED_AT 2019-01-08

# 覆盖原文件
ADD sources.list /etc/apt/sources.list

RUN apt-get -qq update
RUN apt-get -qq install ruby ruby-dev libffi-dev build-essential nodejs
RUN gem install --no-rdoc --no-ri jekyll -v 2.5.3

VOLUME /data
VOLUME /var/www/html
WORKDIR /data

ENTRYPOINT [ "jekyll", "build", "--destination=/var/www/html" ]

# 构建镜像lizhen/jekyll
# docker build -t lizhen/jekyll .
# 下载代码
# git clone https://github.com/jamtur01/james_blog.git
# 运行容器jekyll-demo
# docker run -v /H/Source/dockerbook-blog-master:/data/ --name jekyll-demo lizhen/jekyll